
package com.cap.bts.crmdp.dealer.mars.dao.impl;


import java.util.List;

import javax.inject.Inject;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Repository;

import com.cap.bts.crmdp.dealer.mars.dao.IMarsConfigDao;
import com.cap.bts.crmdp.dealer.mars.domain.MarsConfig;
import com.cap.bts.framework.common.dao.callback.NativeQueryBySqlJpaCallback;
import com.cap.bts.framework.common.dao.impl.BaseDaoImpl;
import com.cap.bts.framework.common.exception.AppException;


@Repository("marsConfigDao")
public class MarsConfigDaoImpl extends BaseDaoImpl<MarsConfig, Long>implements IMarsConfigDao {

   
    @Inject
    public MarsConfigDaoImpl(@Value("com.cap.bts.crmdp.dealer.mars.domain.MarsConfig")Class<MarsConfig> clazz) {
        super(clazz);
    }
    
    
    public List<Object> getCutoverDealerIdList() throws AppException {
//            String sql = "SELECT dealer_id FROM tm_mars_cutover_status where status = 'C'";
            String sql = "SELECT dealer_id FROM tm_mars_cutover_status where change_date < NOW() ";
            return getJpaTemplate().executeFind(new NativeQueryBySqlJpaCallback<List<String>>(sql));
        }
  
  
}
